using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UiCon : MonoBehaviour
{
    public GameObject _player;
    public Text _scoreUI;
    public Text _timeUI;
    public float _time;
    private List<GameObject> _bodyLIst;
    // 每帧调用
    void Update()
    {
        _bodyLIst = _player.GetComponent<SnakeMove>()._bodyList;
        _scoreUI.text = (_bodyLIst.Count - 1).ToString();
        _time = Mathf.Round(Time.time);
        _timeUI.text = _time + "s";
    }
}
